home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk1 / dnet / doc / source.doc < prev    next >
Text File  |  1995-03-18  |  3KB  |  82 lines

  1.  
  2.                SOURCE ORGANIZATION
  3.  
  4. UNIX/AMIGA DIFFERENCES:
  5.     Essentially rewritten between the two, but major modules still do
  6.     the same thing.  The UNIX source has an addition file, FILES.C,
  7.     which contains the routines normally associated with DNET.C on the
  8.     Amiga side.
  9.  
  10.     CONTROL    RECEIVE STAGE DECODE:    Decode incomming packets providing
  11.         packet level commands (PKCMD), then demux PKCMD_WRITE
  12.         packets that are ready in order and execute corresponding
  13.         SCMD_???? commands
  14.  
  15.         TRANSMIT STAGE ENCODE:    Encode data queued by various
  16.         channels into packets, First by multiplexing SCMD_????
  17.         commands queued on TxList, then by generating PKCMD_???
  18.         packets.
  19.  
  20.         PKCMD packets:    WRITE        DATA packet
  21.                 CHECK        Did window X make it over there?
  22.                         (get ACK or NAK response)
  23.                 ACK        ACK a window
  24.                 NAK        NAK a window
  25.                 RESTART     RESTART DNET
  26.                 ACKRSTART   Acknowledge a restart
  27.  
  28.         SCMD packets:    SWITCH        switch channel # (multiplexer)
  29.                         for DATA packets
  30.                 OPEN        open a new connection (contains
  31.                         the channel to use)
  32.                 CLOSE        close a connection (channel)
  33.                 ACKCMD        acknowledge an OPEN.  Responses
  34.                         are (a) channel in use, try a
  35.                             different channel
  36.                         (b) channel now open
  37.                         (c) port does not exist
  38.                 EOFCMD        EOF on channel without closing
  39.                         it (not supported by UNIX end)
  40.                 QUIT        Cause DNET server to exit when
  41.                         received
  42.                 DATA        DATA destined for some channel.
  43.  
  44.     DNET
  45.     (UNIX: FILES.C)
  46.         Handles talking to the clients.
  47.  
  48.     GLOBALS    Global variables
  49.  
  50.     NET     The raw network.  On the Amiga end, it opens the device
  51.         and sets up two requests (CMD_READ/CMD_WRITE).  On the
  52.         unix end, has that + NetRead/NetWrite calls.
  53.  
  54.     SUBS    Subroutines and support.
  55.  
  56.  
  57. MULTIPLEXED PROTOCOL BASIS:
  58.  
  59.     All SCMD_???? commands are based on a CHANNEL #, which is separate
  60.     from the PORT # (used only when openning a new connection).  The
  61.     channel number is the multiplexer channel for a connection.  Most
  62.     SCMD commands except SCMD_DATA have some sort of channel id.  The only
  63.     possibility of channel allocation collision occurs in SCMD_OPEN, in
  64.     which case the receiver can send a SCMD_ACKCMD with a 'retry' error
  65.     code.  Channel allocation is based on a random number generator.
  66.  
  67. PRIORITY:
  68.     Each channel has an associated priority.  The priority determines
  69.     the packet size in a relative manner (that is, a channel with
  70.     priority -126 is no faster than a channel with +126 when it is
  71.     the only thing running).
  72.  
  73.     The physical packet size is reduced when both a high priority and
  74.     a low priority channel is active at the same time.    Otherwise, there
  75.     would be a 30 second delay typing characters from a TERM when a
  76.     file transfer is going on in the background.  If you stop typing in
  77.     the TERM you will notice the packet size (as per Rx and Tx l.e.d's on
  78.     your modem) slowly increases for the file transfer.
  79.  
  80.  
  81.  
  82.